package cn.edu.tju.se.auth.service;

import java.util.List;
import java.util.Set;

import cn.edu.tju.se.auth.enity.Group;
import cn.edu.tju.se.auth.enity.Role;
import cn.edu.tju.se.auth.enity.Udr;

public interface UdrService {
	
	public Set<Udr> getByRoleId(Long roleId);

	public Set<Udr> getByUserIdAndGroupId(Long userId,Long groupId);
	
	public Set<Udr> getByUserId(Long userId);
	
	public List<Role> getMyRoles(Long userId);
	
	public List<String> getMyRolesNames(Long userId);
	
	public List<Group> getMyGroups(Long userId);
	
	public Udr save(Udr udr);
	
	public List<Udr> saveAll(List<Udr> udr);
	
	public void delete(int id);
	
	public void deleteAll(Set<Udr> udr,String type);
	
	public void update(Udr udr);
	
}
